create a new structure starting with a old one

imports


In [1]:
import lib.operations as operations
from lib.schemas import *
from lib.subjectRepresentations import *
from lib.textRepresentations import *
from lib.paths import *
from lib.dataManager import *
from lib.optionsFactory import *

create the problem1


In [2]:
schema1=Schema("PoissonEF","PoissonEI",operations.addition,"PoissonGAIN","change")
schema2=Schema("ViandeEF","ViandeEI",operations.addition,"ViandeGAIN","change")
struct=ProblemStructure()
struct.addSchema(schema1)
struct.addSchema(schema2)
struct.addBridgingSchemas(schema1,schema2)
struct.updateObjectSet()

text=Text()
text.addTextInformation(TextInformation(Representation(Quantity("PoissonGAIN","P1"),'Au supermarché, le kilo de poisson a augmenté de 5 euros cette année')))
text.addTextInformation(TextInformation(Representation(Quantity("PoissonEF","T1"),'Un kilo de poisson coute maintenant 12 euros.')))
text.addTextInformation(TextInformation(Representation(Quantity("PoissonEIminusViandeEI","dEI"),'Au début de l\'année, le kilo de viande coutait le même prix que le kilo de poisson.')))
text.addTextInformation(TextInformation(Representation(Quantity("PoissonGAINminusViandeGAIN","d"),'Le kilo de viande a augmenté de 3 euros de moins que le kilo de poisson')))
text.setGoal(TextGoal(Goal('ViandeEF','Combien coute le kilo de viande maintenant?')))

text.getTextInformation(0).addAlternativeRepresentation(Representation(Quantity("PoissonEI","P1"),'Au supermarché, le kilo de poisson était de 5 euros'))
text.getTextInformation(0).addAlternativeRepresentation(Representation(Quantity("PoissonEF","P1"),'Au supermarché, le kilo de poisson coute 5 euros'))
text.getTextInformation(1).addAlternativeRepresentation(Representation(Quantity("PoissonEI","T1"),'Un kilo de poisson était de 12 euros.'))
text.getTextInformation(2).addAlternativeRepresentation(Representation(Quantity("PoissonEFminusViandeEF","dEI"),'Au la fin de l\'année, le kilo de viande coute le même prix que le kilo de poisson.'))
text.getTextInformation(2).addAlternativeRepresentation(Representation(Quantity("PoissonGAINminusViandeGAIN","dEI"),'Le kilo de viande a augmenté du même prix que le kilo de poisson.'))
text.getTextInformation(3).addAlternativeRepresentation(Representation(Quantity("ViandeGAIN","d"),'Le kilo de viande a augmenté de 3 euros'))
text.getTextInformation(3).addAlternativeRepresentation(Representation(Quantity("ViandeGAIN","-d"),'Le kilo de viande a diminué de 3 euros'))
text.getTextInformation(3).addAlternativeRepresentation(Representation(Quantity("PoissonGAINminusViandeGAIN","-d"),'Le kilo de viande a augmenté de 3 euros de plus que le kilo de poisson'))
text.getTextInformation(3).addAlternativeRepresentation(Representation(Quantity("PoissonEFminusViandeEF","d"),'Le kilo de viande vaut 3 euros de moins que le kilo de poisson'))
text.getTextInformation(3).addAlternativeRepresentation(Representation(Quantity("PoissonEFminusViandeEF","-d"),'Le kilo de viande vaut 3 euros de plus que le kilo de poisson'))
text.getTextInformation(3).addAlternativeRepresentation(Representation(Quantity("ViandeEF","d"),'Le kilo coute 3 euros à la fin'))
probleme1=Problem(struct,text)

Deep copy of problem1


In [3]:
problem2=copy.deepcopy(probleme1)
problem3=copy.deepcopy(probleme1)

renameObjects function


In [4]:
renameDic={'PoissonEF': 'PoissonEFsecond',
           'PoissonEI': 'PoissonEIsecond', 
           'PoissonGAIN': 'PoissonGAINsecond',
           'ViandeEF': 'ViandeEFsecond',
           'ViandeEI': 'ViandeEIsecond', 
           'ViandeGAIN': 'ViandeGAINsecond',
           'PoissonGAINminusViandeGAIN' : 'PoissonGAINminusViandeGAIN_second', 
           'PoissonEIminusViandeEI' : 'PoissonEIminusViandeEI_second', 
           'PoissonEFminusViandeEF' : 'PoissonEFminusViandeEF_second'  
           }

In [5]:
problem2.renameObjects(renameDic)
print(problem2.structure.objectSet)


set(['PoissonEFminusViandeEF_second', 'ViandeGAINsecond', 'ViandeEIsecond', 'PoissonGAINsecond', 'PoissonEFsecond', 'PoissonEIsecond', 'PoissonGAINminusViandeGAIN_second', 'ViandeEFsecond', 'PoissonEIminusViandeEI_second'])

In [6]:
for ti in problem2.text.textInformations:
    for rep in ti.representations:
        print(rep.quantity.object)


PoissonGAINsecond
PoissonEIsecond
PoissonEFsecond
PoissonEFsecond
PoissonEIsecond
PoissonEIminusViandeEI_second
PoissonEFminusViandeEF_second
PoissonGAINminusViandeGAIN_second
PoissonGAINminusViandeGAIN_second
ViandeGAINsecond
ViandeGAINsecond
PoissonGAINminusViandeGAIN_second
PoissonEFminusViandeEF_second
PoissonEFminusViandeEF_second
ViandeEFsecond

renameKeywordObjects function


In [7]:
keydic={"Poisson":"Morue","Viande":"Cerf"}
problem3.renameKeywordObjects(keydic)

In [8]:
print(problem3.structure.objectSet)


set(['MorueGAINminusCerfGAIN', 'MorueEIminusCerfEI', 'CerfEI', 'MorueEI', 'MorueEFminusCerfEF', 'MorueEF', 'CerfEF', 'MorueGAIN', 'CerfGAIN'])

In [9]:
for s in problem3.structure.schemas:
    print(s.objects)


{'q1': 'MorueEI', 'q2': 'MorueGAIN', 'qf': 'MorueEF'}
{'q1': 'CerfEI', 'q2': 'CerfGAIN', 'qf': 'CerfEF'}
{'q1': 'MorueEI', 'q2': 'CerfEI', 'qf': 'MorueEIminusCerfEI'}
{'q1': 'MorueGAIN', 'q2': 'CerfGAIN', 'qf': 'MorueGAINminusCerfGAIN'}
{'q1': 'MorueEF', 'q2': 'CerfEF', 'qf': 'MorueEFminusCerfEF'}
{'q1': 'MorueEIminusCerfEI', 'q2': 'MorueGAINminusCerfGAIN', 'qf': 'MorueEFminusCerfEF'}

In [10]:
for ti in problem3.text.textInformations:
    for rep in ti.representations:
        print(rep.quantity.object)


MorueGAIN
MorueEI
MorueEF
MorueEF
MorueEI
MorueEIminusCerfEI
MorueEFminusCerfEF
MorueGAINminusCerfGAIN
MorueGAINminusCerfGAIN
CerfGAIN
CerfGAIN
MorueGAINminusCerfGAIN
MorueEFminusCerfEF
MorueEFminusCerfEF
CerfEF

In [11]:
problem3.setInitialValues({"P1":5,"T1":12,"dEI":0,"d":3,"-d":-3})
problem3.name="Tc4t"

Let see if the solving process still works

problem2


In [12]:
upD=Updater(problem2) 
upD.startAsUnderstood() 
c1=IntervalConstraint(['EF','EI'],operations.superiorOrEqualTo0) 
c2=BehavioralConstraint(breakTheOldOne=True)
constraints=[c1,c2]
autoSolver=Solver(upD,constraints)
l=[autoSolver.SOLVER]
autoSolver.generalSequentialSolver(listOfActions=l)
autoSolver.TreePaths.scanTree()
print(autoSolver.TreePaths.treeOutput)


 T1 - P1 = T1  (PoissonEIsecond)
	 dEI - T1 = dEI  (ViandeEIsecond)
		 d - P1 = d  (ViandeGAINsecond)
			 dEI + d = dEId  (ViandeEFsecond)
				(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
			 dEI + d = dEId  (PoissonEFminusViandeEF_second)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
		 dEI + d = dEId  (PoissonEFminusViandeEF_second)
			 d - P1 = d  (ViandeGAINsecond)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
			 dEId - T1 = dEId  (ViandeEFsecond)
				(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
	 d - P1 = d  (ViandeGAINsecond)
		 dEI - T1 = dEI  (ViandeEIsecond)
			 dEI + d = dEId  (ViandeEFsecond)
				(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
			 dEI + d = dEId  (PoissonEFminusViandeEF_second)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
		 dEI + d = dEId  (PoissonEFminusViandeEF_second)
			 dEI - T1 = dEI  (ViandeEIsecond)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
			 dEId - T1 = dEId  (ViandeEFsecond)
				(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
	 dEI + d = dEId  (PoissonEFminusViandeEF_second)
		 dEI - T1 = dEI  (ViandeEIsecond)
			 d - P1 = d  (ViandeGAINsecond)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
			 dEId - T1 = dEId  (ViandeEFsecond)
				(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
		 d - P1 = d  (ViandeGAINsecond)
			 dEI - T1 = dEI  (ViandeEIsecond)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
			 dEId - T1 = dEId  (ViandeEFsecond)
				(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
		 dEId - T1 = dEId  (ViandeEFsecond)
			(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
 d - P1 = d  (ViandeGAINsecond)
	 T1 - P1 = T1  (PoissonEIsecond)
		 dEI - T1 = dEI  (ViandeEIsecond)
			 dEI + d = dEId  (ViandeEFsecond)
				(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
			 dEI + d = dEId  (PoissonEFminusViandeEF_second)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
		 dEI + d = dEId  (PoissonEFminusViandeEF_second)
			 dEI - T1 = dEI  (ViandeEIsecond)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
			 dEId - T1 = dEId  (ViandeEFsecond)
				(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
	 dEI + d = dEId  (PoissonEFminusViandeEF_second)
		 T1 - P1 = T1  (PoissonEIsecond)
			 dEI - T1 = dEI  (ViandeEIsecond)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
			 dEId - T1 = dEId  (ViandeEFsecond)
				(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
		 dEId - T1 = dEId  (ViandeEFsecond)
			(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
 dEI + d = dEId  (PoissonEFminusViandeEF_second)
	 T1 - P1 = T1  (PoissonEIsecond)
		 dEI - T1 = dEI  (ViandeEIsecond)
			 d - P1 = d  (ViandeGAINsecond)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
			 dEId - T1 = dEId  (ViandeEFsecond)
				(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
		 d - P1 = d  (ViandeGAINsecond)
			 dEI - T1 = dEI  (ViandeEIsecond)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
			 dEId - T1 = dEId  (ViandeEFsecond)
				(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
		 dEId - T1 = dEId  (ViandeEFsecond)
			(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
	 d - P1 = d  (ViandeGAINsecond)
		 T1 - P1 = T1  (PoissonEIsecond)
			 dEI - T1 = dEI  (ViandeEIsecond)
				 dEI + d = dEId  (ViandeEFsecond)
					(dEI-(T1-P1))+(d-P1) : interpretation -> (PoissonEIminusViandeEI_second-(PoissonEFsecond-PoissonGAINsecond))+(PoissonGAINminusViandeGAIN_second-PoissonGAINsecond)=ViandeEFsecond
				 dEId - T1 = dEId  (ViandeEFsecond)
					(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
			 dEId - T1 = dEId  (ViandeEFsecond)
				(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
		 dEId - T1 = dEId  (ViandeEFsecond)
			(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond
	 dEId - T1 = dEId  (ViandeEFsecond)
		(dEI+d)-T1 : interpretation -> (PoissonEIminusViandeEI_second+PoissonGAINminusViandeGAIN_second)-PoissonEFsecond=ViandeEFsecond


In [13]:
problem3


Out[13]:
<lib.subjectRepresentations.Problem instance at 0x000000000A36FEC8>

In [14]:
upD=Updater(problem3) 
upD.startAsUnderstood() 
c1=IntervalConstraint(['EF','EI'],operations.superiorOrEqualTo0) 
c2=BehavioralConstraint(breakTheOldOne=True)
constraints=[c1,c2]
autoSolver=Solver(upD,constraints)
l=[autoSolver.SOLVER]
autoSolver.generalSequentialSolver(listOfActions=l)
autoSolver.TreePaths.scanTree()
print(autoSolver.TreePaths.treeOutput)


 12 - 5 = 7  (MorueEI)
	 7 - 0 = 7  (CerfEI)
		 5 - 3 = 2  (CerfGAIN)
			 7 + 2 = 9  (CerfEF)
				(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
			 3 + 0 = 3  (MorueEFminusCerfEF)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
		 3 + 0 = 3  (MorueEFminusCerfEF)
			 5 - 3 = 2  (CerfGAIN)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
			 12 - 3 = 9  (CerfEF)
				T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
	 5 - 3 = 2  (CerfGAIN)
		 7 - 0 = 7  (CerfEI)
			 7 + 2 = 9  (CerfEF)
				(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
			 3 + 0 = 3  (MorueEFminusCerfEF)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
		 3 + 0 = 3  (MorueEFminusCerfEF)
			 7 - 0 = 7  (CerfEI)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
			 12 - 3 = 9  (CerfEF)
				T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
	 3 + 0 = 3  (MorueEFminusCerfEF)
		 7 - 0 = 7  (CerfEI)
			 5 - 3 = 2  (CerfGAIN)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
			 12 - 3 = 9  (CerfEF)
				T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
		 5 - 3 = 2  (CerfGAIN)
			 7 - 0 = 7  (CerfEI)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
			 12 - 3 = 9  (CerfEF)
				T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
		 12 - 3 = 9  (CerfEF)
			T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
 5 - 3 = 2  (CerfGAIN)
	 12 - 5 = 7  (MorueEI)
		 7 - 0 = 7  (CerfEI)
			 7 + 2 = 9  (CerfEF)
				(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
			 3 + 0 = 3  (MorueEFminusCerfEF)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
		 3 + 0 = 3  (MorueEFminusCerfEF)
			 7 - 0 = 7  (CerfEI)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
			 12 - 3 = 9  (CerfEF)
				T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
	 3 + 0 = 3  (MorueEFminusCerfEF)
		 12 - 5 = 7  (MorueEI)
			 7 - 0 = 7  (CerfEI)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
			 12 - 3 = 9  (CerfEF)
				T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
		 12 - 3 = 9  (CerfEF)
			T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
 3 + 0 = 3  (MorueEFminusCerfEF)
	 12 - 5 = 7  (MorueEI)
		 7 - 0 = 7  (CerfEI)
			 5 - 3 = 2  (CerfGAIN)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
			 12 - 3 = 9  (CerfEF)
				T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
		 5 - 3 = 2  (CerfGAIN)
			 7 - 0 = 7  (CerfEI)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
			 12 - 3 = 9  (CerfEF)
				T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
		 12 - 3 = 9  (CerfEF)
			T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
	 5 - 3 = 2  (CerfGAIN)
		 12 - 5 = 7  (MorueEI)
			 7 - 0 = 7  (CerfEI)
				 7 + 2 = 9  (CerfEF)
					(T1-P1)+(P1-d) : interpretation -> ((MorueEF-MorueGAIN)-MorueEIminusCerfEI)+(MorueGAIN-MorueGAINminusCerfGAIN)=CerfEF
				 12 - 3 = 9  (CerfEF)
					T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
			 12 - 3 = 9  (CerfEF)
				T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
		 12 - 3 = 9  (CerfEF)
			T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF
	 12 - 3 = 9  (CerfEF)
		T1-d : interpretation -> MorueEF-(MorueGAINminusCerfGAIN+MorueEIminusCerfEI)=CerfEF


In [14]: